﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Elderos.Ontology;

namespace Elderos.Highlight.Rules
{
    //be sure rule GUID is unique
    [RankingRule("SynonymLength", RuleType.Synonym)]
    public class RuleSynonymLength : SynonymRule
    {
        public RuleSynonymLength(IOntologyData ontology) : base(ontology) { }

        protected override IRuleResult ComputeResult(string synonym)
        {
            return new ContiniousResult(Name, synonym.Length);
        }

        public override IRuleResult EmptyResult
        {
            get { return new ContiniousResult(Name, 0); }
        }
    }
}
